import 'package:flutter/material.dart';
import 'package:karyo/karyo.dart';

class RoundedButton extends StatelessWidget {
  final String text;
  final Function press;
  final Color color, textColor;
  const RoundedButton({
    Key key,
    this.text,
    this.press,
    this.color,
    this.textColor = Colors.white,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Theme(
        data: ThemeData(
          shadowColor: Colors.grey.withAlpha(10),
        ),
        child: RaisedButton(
          elevation: 10,
          shape:
              RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.0)),
          padding:
              EdgeInsets.symmetric(horizontal: size.width * 0.35, vertical: 20),
          color: color,
          onPressed: press,
          child: Text(
            text,
            style: NORMAL_BOLD_TXT_STYLE.copyWith(color: textColor),
          ),
        ));
  }
}
